#pragma once
#include <list>
#include <vector>
#include "TCharSupport.h"
#include "EpilObjectType.h"
#include "EpilAssignType.h"
#include "EpilOperator.h"

#define EPIL_OBJECT_DECL( Type )		public: virtual EpilObjectType GetType() const { return EOT_##Type; }

using namespace std;


class EpilInterpreter;


class EpilObject
{
public:
	EpilObject( EpilInterpreter * interpreter );
	virtual ~EpilObject();

	virtual EpilObject *				OperateUnary( EpilUnaryOperator op ) = 0;
	virtual EpilObject *				OperateBinary( EpilBinaryOperator op, EpilObject * that ) = 0;
	virtual EpilAssignType				GetAssignType() const = 0;
	virtual EpilObjectType				GetType() const = 0;
	virtual tstring						ToString() const = 0;
	virtual bool						operator==( const EpilObject & rhs ) const = 0;
	virtual EpilObject *				CreateCopy() = 0;
	virtual void						ReleaseCopy() = 0;

protected:
	EpilInterpreter *					GetInterpreter() const							{ return m_interpreter; }

private:
	EpilInterpreter *					m_interpreter;
};


typedef list<EpilObject*>				EpilObjectList;
typedef vector<EpilObject*>				EpilObjectVector;